;;选择theme
(load-theme 'tango-dark)
(setq inhibit-startup-screen t)
;;显示列号
(setq column-number-mode t)
(global-linum-mode t)


;;=============== 自动插入括号 ===========================
(electric-pair-mode 1)
;;高亮显示成对括号
(show-paren-mode 1)
(setq show-paren-syle 'parentheses)

;;==================================================
;;回显区
;;==================================================
;;闪屏报警
(setq visible-bell 1)
;;================ 使用 y or n 提问 =======================
(fset 'yes-or-no-p 'y-or-n-p)

;;============================================================
;;编辑器设定
;;============================================================
;;=============== no backup ===============================
(setq mack-backup-files nil)
;;只渲染当前屏幕语法高亮，加快显示速度
(setq lazy-lock-defer-on-scrolling t)

;;============================== 缩进 
(require 'cc-mode)
(setq c-default-style "linux"
      c-basic-offset 4)
(setq-default c-basic-offset 4
	      tab-width 4
	      indent-tabs-mode t)
(add-hook 'c-mode-hook '(lambda() (c-toggle-hungry-state 1)))
(define-key c-mode-base-map (kbd "RET") 'newline-and-indent)

;;===================禁用工具栏==============================
(when (functionp 'tool-bar-mode)
  (tool-bar-mode 0))
(when (functionp 'scroll-bar-mode)
  (scroll-bar-mode 0))
;;在行首C-k时，同时删除改行
(setq-default kill-whole-line t)

;;================ molokai-theme.el
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")

;;================ auto-complete ===========================
(when (require 'auto-complete-config nil 'noerror)
  (require 'auto-complete-config)
  (require 'auto-complete)
  (global-auto-complete-mode t)
  (ac-config-default)
  )
;;================ Yasnippet ===============================
(require 'yasnippet)
(yas-global-mode 1)

;;=================================================================
(global-visual-line-mode t)
(setq org-src-fontify-natively t)

;;===============我的common lisp语言设置============
;;(setq inferior-lisp-program "/usr/bin/sbcl")
;;(add-to-list 'load-path "~/.emacs.d/slime/")
;;(require 'slime)
;(slime-setup)

;;= ================== org mode
(setq org-export-with-sub-superscripts nil)
;;==================== hide menu bar
(unless (display-graphic-p)
  (menu-bar-mode -1)
  (setq linum-format "%d "))

;; ================= custom org mode
(load "org-mode-ldk.el")

;; ================= NeoTree
(require 'neotree)
(global-set-key [f8] 'neotree-toggle)
(pcase system-type
  ;; GNU/Linux or WSL
  (gnu/linux
   (load "system-linux.el"))
  ;; macOS
  (darwin
   (load "system-mac.el"))
  ;; Windows
  (windows-nt
   (load "system-window.el"))
  )
